﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace tlBasic.Application 
{
    public class IviewAdminTreeNode
    {
        /// <summary>
        /// id
        /// </summary>
        public long? id { get; set; }

        /// <summary>
        /// 父id
        /// </summary>
        public long? parentid { get; set; }

        /// <summary>
        /// 路由名称, 必须设置,且不能重名
        /// </summary>
        public string name { get; set; }

        /// <summary>
        /// 组件
        /// </summary>
        public string component { get; set; }

        /// <summary>
        /// 允许传参
        /// </summary>
        public bool props { get; set; }

        public string propsinfo { get; set; }
        /// <summary>
        /// 动态标题参数
        /// </summary>
        public bool propstitle { get; set; }
        /// <summary>
        /// 路由元信息（路由附带扩展信息）
        /// </summary>
        public Meta meta { get; set; }

        /// <summary>
        /// 路径
        /// </summary>
        public string path { get; set; }
    }

    /// <summary>
    /// 路由元信息内部类
    /// </summary>
    public class Meta
    {
        /// <summary>
        /// 路由标题, 用于显示面包屑, 页面标题 *推荐设置
        /// </summary>
        public string title { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string icon { get; set; }

        /// <summary>
        /// 设为true后在左侧菜单不会显示该页面选项
        /// </summary>
        public bool hideInMenu { get; set; }

        /// <summary>
        /// 设为true后如果该路由只有一个子路由，在菜单中也会显示该父级菜单
        /// </summary>
        public bool showAlways { get; set; }
        /// <summary>
        /// 设为true后页面不会缓存
        /// </summary>
        public bool notCache { get; set; }

        /// <summary>
        /// 内链打开http链接
        /// </summary>
        public string href { get; set; }

        /// <summary>
        /// 如需外部打开，增加：_blank
        /// </summary>
        public string target { get; set; }
    }
}
